<template>
  <div id="app">
    <transition>
      <keep-alive>
        <component :is="assembly[assemblyIndex]"></component>
      </keep-alive>
    </transition>
    <!-- 底部 -->
    <Tabbar @clickTabbar="handleTabbar"></Tabbar>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      assemblyIndex: 0,
      assembly: ["Index", "Baobaotuan",'Order','Mine'],
    };
  },
  methods: {
    handleTabbar(payload) {
      this.assemblyIndex = payload;
    },
  },
};
</script>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
input,
button {
  border: 0;
  outline: none;
}
a,
u {
  text-decoration: none;
}
body {
  background-color: black;
}
#app {
  width: 360px;
  height: 600px;
  background-color: #fff;
  margin: 30px auto;
  position: relative;
}
</style>
